//
//  SEGAlertView.h
//  ExcellentHome
//
//  Created by 刘山 on 16/7/19.
//  Copyright © 2016年 陈区. All rights reserved.
//

/*
 
 这里是提示框的公共组件
 
 */
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#define kFrameworkAlertPalteForm @"SEGFrameworkAlertPalteForm"
@interface SEGAlertViewShowType : NSObject
@property (nonatomic, copy) NSString* title;
@property (nonatomic, assign) UIAlertActionStyle actionStyle;
- (instancetype)initWithTitle:(NSString*)title ActionType:(UIAlertActionStyle)actionType;
+ (instancetype)alertViewShowTypeWithTitle:(NSString*)title ActionType:(UIAlertActionStyle)actionType;
@end

typedef void (^SEGAlertViewHander)(UIAlertAction* action);
typedef void (^SEGAlertViewSheetHander)(NSInteger action);

@interface SEGAlertView : NSObject

/**
 *  可及时隐藏的的消息提示框
 *
 *  @param msg 消息内容
 */
+ (void)showTmepMessageWithMessage:(NSString*)msg;

///  可及时隐藏的的消息提示框
///
///  @param msg  消息内容
///  @param time 显示时间
+ (void)showTmepMessageWithMessage:(NSString*)msg withtime:(CGFloat)time;

///  可及时隐藏的的消息提示框
///
///  @param msg            消息内容
///  @param preferredStyle 内容显示样式
+ (void)showTmepMessageWithMessage:(NSString*)msg preferredStyle:(UIAlertControllerStyle)preferredStyle;

///  带有按钮的消息提示框 iOS8 以上
+ (void)showAlertWithTitle:(NSString*)title Message:(NSString*)msg ShowActionStyle:(NSArray<SEGAlertViewShowType*>*)showType Hander:(SEGAlertViewHander)confirm;

///  带有按钮的消息提示框 iOS6 以上
///
///  @param delegate   代理
///  @param titleArray 标题数组
///  @param index      按钮字体红色的位置：从顶部开始，开始坐标1
+ (void)showAlertWithDlegate:(id)delegate withTitleArray:(NSArray*)titleArray destructiveButtonIndex:(NSInteger)index;

+ (void)showTmepMessageWithMessage:(NSString*)msg withtime:(CGFloat)time WithTitle:(NSString*)title;

/// 带有标题的提示消息
+ (void)showTmepMessageWithTitle:(NSString*)title message:(NSString*)msg;

/// 带有图片的提示消息
/// @param msg msg
/// @param image image
+ (void)showTmepMessageWithMessage:(NSString *)msg image:(UIImage *)image;

/// 带有图片的提示消息
/// @param msg msg
/// @param time time
/// @param image image
+ (void)showTmepMessageWithMessage:(NSString*)msg withtime:(CGFloat)time image:(UIImage *)image;

#pragma mark - 穿越提示
/// 刷新/穿越提示
+ (void)showRefrshTipsWithMessage:(NSString *)msg parentView:(UIView *)parentView;
+ (void)removeRefrshTipsWithParentView:(UIView *)parentView;
@end
